package com.zut.Service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.zut.Mapper.UserMapper;
import com.zut.pojo.User;

@Service("userService")
public class UserServiceImpl implements UserService {
	@Autowired
	@Qualifier("userMapper")
	private UserMapper userMapper;
	@Override
	public void add(User user) {
		userMapper.addUser(user);
	}

	public void deleteById(Integer id) {
		userMapper.deleteUserById(id);
	}

	public void update(User user) {
		userMapper.updateUser(user);
	}

	public User findById(Integer id) {
		return userMapper.findUserById(id);
	}
	
}